<% @class = "theme-auto" %>

<% content_for :form_content do %>
  <div class="border rounded-md p-6 md:p-12 mb-8">
    <%= form_tag password_resets_path, novalidate: "novalidate" do %>
      <h1 class="font-bold text-lg mb-4">Reset Password</h1>
      <%= render partial: "shared/flash", locals: {flash: flash} %>

      <div class="mb-8">
        <%= render Form::TextInputComponent.new do |text| %>
          <% text.label_content do %>
            <label for="email">Account email</label>
          <% end %>
          <% text.input do %>
            <%= email_field_tag :email, params[:email], class: "text-input", tabindex: 1, autofocus: true %>
          <% end %>
        <% end %>
      </div>

      <button type="submit" class="button flex w-full" tabindex="2">Send Reset Link</button>
    <% end %>
  </div>
  <p class="text-center text-500">Already have an account?</p>
  <p class="text-center"><%= link_to "Sign In", login_path, class: "font-medium" %></p>
<% end %>

<%= render template: "layouts/form_page" %>

